package com.ssh.controller;

import com.ssh.entity.Bzdm;
import com.ssh.entity.User;
import com.ssh.service.BzdmService;
import com.ssh.service.UserService;
import com.ssh.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


@Controller
@RequestMapping("/bzdm")
public class BzdmController {

    @Autowired
    private BzdmService bzdmService;
    @RequestMapping("/getAllBzdm")
    @ResponseBody
    public R getAllUser(HttpServletRequest request){
        List<Bzdm> allUser = bzdmService.getAllBzdm();
        Map<String, Object> map = new HashMap<>();
        map.put("list",allUser);
        return R.success().data(map);
    }

}
